/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.PurchaseStatisticalMapper;
public class PurchaseStatisticalAction extends BaseAction
{
    @Autowired(required=false)
	private PurchaseStatisticalMapper mapper;
    /**
    统计图
    */
    
    public Map purchaseStatistical() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> all=mapper.all(params);
        result.put("all", all);
        
        
        result.put("s_search", pagination.getSearchParas());
        
        return result;
    }
    /**
    */
    
    public Object s_plan() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_plan=mapper.s_plan(params,pagination);
        s_plan.setPagedListInfo(pagination);
        result.put("s_plan", s_plan);
        
        return s_plan;
    }
    /**
    饼状统计图
    */
    
    public Map pancakeStatisticalSupply() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> s_c=mapper.s_c(params);
        result.put("s_c", s_c);
        
        return result;
    }
    /**
    采购计划明细
    */
    
    public Map increaseProcurementDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_plan=mapper.t_plan(params);
        SQLMap t_plan_emt=t_plan.getExistfirst();
        result.put("t_plan", t_plan_emt);
        
        
        SQLList<SQLMap> s_pro=mapper.s_pro(params);
        result.put("s_pro", s_pro);
        
        return result;
    }
    /**
    安排采购
    */
    
    public Map arrangeProcure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_pro=mapper.s_pro(params);
        result.put("s_pro", s_pro);
        
        
        Object contact_name =mapper.contact_name(params);
        result.put("contact_name", contact_name);
        
        
        SQLList<SQLMap> t_plan=mapper.t_plan(params);
        SQLMap t_plan_emt=t_plan.getExistfirst();
        result.put("t_plan", t_plan_emt);
        
        return result;
    }
    /**
    任务详情
    */
    
    public Map taskDetailsProcure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_task=mapper.t_task(params);
        SQLMap t_task_emt=t_task.getExistfirst();
        result.put("t_task", t_task_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_plan() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_plan(params);
        
        return result;
    }
    /**
    增加采购计划修改
    */
    
    public Map increaseProcurementSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int pro_id = mapper.pro_id(params);
        result.put("pro_id", pro_id);
        
        
        mapper.increaseProcurementSubmit(params);
        
        return result;
    }
    /**
    安排采购修改
    */
    
    public Map arrangeProcureSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_task = mapper.i_task(params);
        result.put("i_task", i_task);
        
        
        mapper.arrangeProcureSubmit(params);
        
        return result;
    }
}